package net.java.mediasystems.database.core.repository.jpa;

import net.java.mediasystems.database.core.model.MediaItem;
import net.java.mediasystems.database.core.repository.custom.MediaItemCustomRepository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface MediaItemRepository extends JpaRepository<MediaItem, Long>, MediaItemCustomRepository {
	
	/**
	 * Find a Page of MediaItems by Title.
	 * <br/>
	 * The Page will be formed by the given Pageable.
	 * 
	 * @param title String
	 * @param pageable Pageable
	 * @return Page<MediaItem>
	 */
	Page<MediaItem> findByTitleLikeIgnoreCase(String title, Pageable pageable);
}
